<!DOCTYPE html>
<html lang="en"  xmlns:th="http://www.thymeleaf.org">
<head>
    <head th:replace="/common/head :: head"></head>
</head>
<body>
<!-- START PAGE CONTAINER -->
<div class="page-container">

    <!-- START PAGE SIDEBAR -->
    <div class="page-sidebar">
        <!-- START X-NAVIGATION -->
        <div th:replace="/common/left :: left"></div>
        <!-- END X-NAVIGATION -->
    </div>
    <!-- END PAGE SIDEBAR -->

    <!-- PAGE CONTENT -->
    <div class="page-content">

        <div th:replace="/common/top :: top"/>

        <!-- START BREADCRUMB -->
        <!--<ul class="breadcrumb">
            <li><a href="#">Home</a></li>
            <li><a href="#">基础信息管理</a></li>
            <li class="active">用户信息管理</li>
        </ul>-->
        <!-- END BREADCRUMB -->

        <!-- PAGE CONTENT WRAPPER -->
        <div class="page-content-wrap">


            <div class="row">
                <div class="col-md-12">

                    <!-- START DATATABLE EXPORT -->
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h3 class="panel-title">用户列表</h3>
                            <div class="pull-right">
                                <div class="btn-group">
                                   <!-- <button class="btn btn-success dropdown-toggle btn-condensed" data-target='#userInfoAddModal' data-toggle='modal'><i
                                            class="fa fa-plus"></i></button>-->
                                </div>
                               <!-- <div class="btn-group">
                                    <button type="button" class="btn btn-default panel-collapse btn-condensed">
                                        <i class="fa fa-caret-up"></i>
                                    </button>
                                </div>-->
                                <div class="panel-heading" style="float: right;">
                                    <div class="btn-group">
                                        <button type="button" class="btn btn-success dropdown-toggle"
                                                onclick="add()">
                                            <i class="glyphicon glyphicon-plus"></i>新增
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="panel-body">
                            <div class="table-responsive">
                                <table id="dataTables-userInfo" class="table table-bordered">
                                    <thead>
                                    <tr>
                                        <!--<th width="5%">ID</th>-->
                                        <th width="10%">用户名</th>
                                        <th width="10%">真实姓名</th>
                                        <th width="5%">启用状态</th>
                                        <th width="10%">最后登录时间</th>
                                        <th width="10%">角色</th>
                                        <th width="15%">操作</th>
                                    </tr>
                                    </thead>
                                </table>
                            </div>
                        </div>
                    </div>
                    <!-- END DATATABLE EXPORT -->

                </div>
            </div>

        </div>
        <!-- END PAGE CONTENT WRAPPER -->
    </div>
    <!-- END PAGE CONTENT -->
</div>
<!-- END PAGE CONTAINER -->

<div class="modal fade" id="userInfoDelModal" tabindex="-1" role="dialog"
     aria-labelledby="userInfoDelModalLabel"
     aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title" id="userInfoDelModalLabel">删除认证</h4>
            </div>
            <div class="modal-body">
                <input id="userInfoId" type="hidden">
                确定要删除这个用户信息么？
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal"><i class="glyphicon glyphicon-ban-circle"></i>取消</button>
                <button type="button" class="btn btn-primary" onclick="userInfoDel()"><i class="glyphicon glyphicon-trash"></i>删除</button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="userInfoEditModal" tabindex="-1" role="dialog"
     aria-labelledby="userInfoEditModalLabel"
     aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title" id="userInfoEditModalLabel">用户修改</h4>
            </div>
            <div class="modal-body">
                <form id="userInfoEditForm">
                    <input type="hidden" id="editId" name="id" />
                    用户名称：<input name="userName" class="form-control" placeholder="请输入用户名称" type="text"
                                id="editUserName" aria-required="true"/>
                    用户密码：<input name="password" class="form-control" placeholder="请输入用户密码" type="password"
                                id="editPassword" aria-required="true"/>
                    真实姓名：<input name="realName" class="form-control" placeholder="请输入真实姓名" type="text"
                                id="editRealName" aria-required="true"/>
                    管理员类型:
                    <select name="superAdmin" class="form-control" id="editSuperAdmin" aria-required="true">
                        <option value="0">普通管理员</option>
                        <option value="1">超级管理员</option>
                    </select>
                    启用状态:
                    <select name="status" class="form-control" id="editStatus" aria-required="true">
                        <option value="">请选择启用状态</option>
                        <option value="1">启用</option>
                        <option value="0">停用</option>
                    </select>
                    <div id="editRoleIdDiv">
                        角色:
                        <select name="roleId" class="form-control" id="editRoleId" aria-required="true">

                        </select>
                    </div>

                    <input type="reset" name="editReset" style="display: none;"/>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal"><i class="glyphicon glyphicon-ban-circle"></i>取消</button>
                <button type="button" class="btn btn-primary" onclick="userInfoEdit()"><i class="glyphicon glyphicon-edit"></i>修改</button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="userInfoAddModal" tabindex="-1" role="dialog"
     aria-labelledby="userInfoAddModalLabel"
     aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title" id="userInfoAddModalLabel">用户新增</h4>
            </div>
            <div class="modal-body">
                <form id="userInfoAddForm">
                    用户名称：<input name="userName" class="form-control" placeholder="请输入用户名称" type="text"
                                id="addUserName" aria-required="true"/>
                    用户密码：<input name="password" class="form-control" placeholder="请输入用户密码" type="password"
                                id="addPassword" aria-required="true"/>
                    真实姓名：<input name="realName" class="form-control" placeholder="请输入真实姓名" type="text"
                                id="addRealName" aria-required="true"/>
                    管理员类型:
                    <select name="superAdmin" class="form-control" id="superAdmin" aria-required="true">
                        <option value="0">普通管理员</option>
                        <option value="1">超级管理员</option>
                    </select>
                    启用状态:
                    <select name="status" class="form-control" id="addStatus" aria-required="true">
                        <option value="1">启用</option>
                        <option value="0">停用</option>
                    </select>
                    <div id="addRoleIdDiv">
                        角色:
                        <select name="roleId" class="form-control" id="addRoleId" aria-required="true">

                        </select>
                    </div>

                    <input type="reset" name="addReset" style="display: none;"/>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal"><i class="glyphicon glyphicon-ban-circle"></i>取消</button>
                <button type="button" class="btn btn-primary" onclick="userInfoAdd()"><i class="glyphicon glyphicon-plus"></i>新建</button>
            </div>
        </div>
    </div>
</div>

<!-- START PRELOADS -->
<!-- END PRELOADS -->

<!-- START SCRIPTS -->
<!-- START PLUGINS -->
<div th:replace="/common/footer :: footer"/>
<script type="text/javascript" th:src="@{/js/self/userManager.js}"></script>

</body>
</html>






